package com.xingkeduo.dao.database.mysql.condition;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

import com.xingkeduo.util.pojo.enums.DatabaseEnum;
import com.xingkeduo.util.tool.ConstantUtil;

/**
 * 
 * @author GJ
 * @time 2018年12月18日 下午4:26:58
 * @description
 */
public class MysqlUserMasterCondition implements Condition {
	@Override
	public boolean matches(ConditionContext arg0, AnnotatedTypeMetadata arg1) {
		return System.getProperty(ConstantUtil.DATABASE).indexOf(DatabaseEnum.MYSQL_USER_MASTER.toConditionString()) > -1;
	}
}
